Skip to content

Conversation

@winstxnhdw
Copy link
Contributor

@winstxnhdw winstxnhdw commented Feb 17, 2023

Summary

As mentioned in #599, I have added some light documentation for invoking the HTTP Lambda functions locally. Additionally, I have fixed all of the non-visual markdown lint warnings/errors. I did not fix all of them to preserve the styling of the original authors in the case that it was done intentionally.

I have also converted Utc.ymd to the non-deprecated Utc.with_ymd_and_hms. Tested and functional.

Explanation

When a reader looks at Deploying with Cargo Lambda, the reader has likely not read the official cargo-lambda documentation. It is then possible that there may be an assumption, through disjunction, that it is possible to execute cargo lambda invoke without the --remote flag.

The user may then try this command on the first given example to find that the command runs successfully. Later on, they may write a HTTP function and assume that the command is a signal of correctness, only to find that the command fails.

Inevitably, after several futile attempts at debugging, the user may come back to the documentation and notice there is no documentation describing their issue until they finally choose to look at the cargo-lambda documentation where they must notice the following in a glance, along with the context of the first paragraph.

image

With the updated documentation, the user will likely perform a search for data did not match any variant of untagged enum LambdaRequest and quickly realise their blunder.

Disclaimer

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

- use `cargo lambda watch` instead of `start` because `start` is not listed in `cargo lambda --help`
- fix incorrect redirect to `cargo lambda watch` instead of `cargo lambda invoke`
@bnusunny bnusunny merged commit 26b330d into aws:main Feb 18, 2023
@greenwoodcm
Copy link
Contributor

good change, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants